#!/bin/sh

#### Script to disable IPv6 PDP context and set down IPv6 GPRS Interface ####
#                                                                           #
#    Original script by:                                                    #
#    Authors: Fuad Abinader (ext-fuad.junior@nokia.com)                     #
#             Vinicius Pinto (ext-vinicius.pinto@nokia.com)                 #
#             Teemu Savolainen (teemu.savolainen@nokia.com)                 #
#                                                                           #
#############################################################################

# Only disconnect if closing bearer is GPRS as well
if [ $ICD_CONNECTION_TYPE ]; then
if [ $ICD_CONNECTION_TYPE == "DUMMY" ]; then

# Disconnect GPRS context
/usr/bin/dbus-send --system --print-reply --dest=com.nokia.csd \
  /com/nokia/csd/gprs/0 com.nokia.csd.GPRS.Context.Disconnect

# Delete GPRS context
/usr/bin/dbus-send --system --print-reply --dest=com.nokia.csd \
  /com/nokia/csd/gprs/0 com.nokia.csd.GPRS.Context.Delete

rm /var/tmp/resolv.conf

fi
fi
